<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>猜数字</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
    <script src="./main.js"></script>
</head>
<body>
    <div class="container" style="width: 30%; margin-top: 32px; ">
        <h2>猜数字</h2>
        <div id="prompt" class="alert alert-danger" style="display: none;">
        </div>
        <div>
            <div class="mb-3 mt-3">
            <label for="numInput" class="form-label">请输入数字:</label>
            <input type="text" class="form-control" id="numInput" placeholder="请输入数字">
            </div>
            <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#myModal">设置</button>
            <button type="submit" onclick="onSubmit()" class="btn btn-primary">提交</button>
        </div>     
    </div>
    <div class="modal" id="myModal">
        <div class="modal-dialog">
          <div class="modal-content">
      
            <!-- 模态框头部 -->
            <div class="modal-header">
              <h4 class="modal-title">随机数范围</h4>
              <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <div id="valueInput" class="alert alert-danger" style="display: none;">
            </div>
            <!-- 模态框内容 -->
            <form action="">
                <div class="mb-3">
                  <label for="min" class="form-label">最小值：</label>
                  <input type="text" class="form-control" id="min" placeholder="请输入最小值：">
                </div>
                <div class="mb-3">
                  <label for="max" class="form-label">最大值：</label>
                  <input type="text" class="form-control" id="max" placeholder="请输入最大值：">
                </div>
              </form>
      
            <!-- 模态框底部 -->
            <div class="modal-footer">
              <button type="submit" onclick="onTry()" class="btn btn-primary" data-bs-dismiss="modal">确定</button>
            </div>
      
          </div>
        </div>
      </div>
</body>
</html>